package com.hzhq.contract.service;

import com.hzhq.contract.bean.dto.AttachmentDTO;
import com.hzhq.contract.bean.entity.Attachment;
import com.hzhq.contract.result.Result;
import io.swagger.models.auth.In;
import org.bson.types.ObjectId;
import org.springframework.data.domain.Page;
import org.springframework.data.mongodb.core.query.Query;

import java.nio.file.Path;
import java.util.List;


/**
 * @author hzhq
 * @create 2021/4/12 8:09 下午
 * @email hzhq1255@163.com
 */
public interface AttachmentService {


    Page<AttachmentDTO> searchAllPageByExample(AttachmentDTO attachmentDTO,Integer currentPage,Integer pageSize);

    Page<AttachmentDTO> searchAllPageByQuery(Query query, Integer currentPage, Integer pageSize);

    AttachmentDTO getOneByContractIdAndMd5(String contractId,String md5);

    AttachmentDTO getOneByContractIdAndAttachId(String contractId, String attachId);

    AttachmentDTO save(AttachmentDTO attachmentDTO);

    String deleteByContractIdAndAttachId(String contractId, String attachId);

    Result<Object> saveAttachment(Attachment attachment);

    List<AttachmentDTO> saveAll(List<AttachmentDTO> attachmentDTOList);

    List<Attachment> savAll(List<Attachment> attachmentList);

    Result<Object> deletedAttachment(ObjectId attachId);

    Result<Object> getPageAttachment(Integer currentPage, Integer pageSize);

    List<String> deleteByIds(List<ObjectId> ids);

    Page<AttachmentDTO> searchAllPages(AttachmentDTO attachmentDTO, Integer currentPage, Integer pageSize);

}
